package edu.hitsz.factory.enemy;

import edu.hitsz.aircraft.BossEnemy;
import edu.hitsz.aircraft.EnemyAircraft;
import edu.hitsz.application.ImageManager;
import edu.hitsz.application.Main;

public class BossFactory implements EnemyFactory{

    @Override
    public EnemyAircraft createEnemy() {
        return new BossEnemy(
                (int) (Math.random() * (Main.WINDOW_WIDTH - ImageManager.MOB_ENEMY_IMAGE.getWidth())),
                (int) (ImageManager.MOB_ENEMY_IMAGE.getHeight()),
                4,
                0,
                500, 20);
    }

    @Override
    public EnemyAircraft createEnemy(double rate) {
        return new BossEnemy(
                (int) (Math.random() * (Main.WINDOW_WIDTH - ImageManager.MOB_ENEMY_IMAGE.getWidth())),
                (int) (ImageManager.MOB_ENEMY_IMAGE.getHeight()),
                4,
                0,
                500, (int) (20*rate));
    }

    public EnemyAircraft createEnemy(int hp, int power) {
        return new BossEnemy(
                (int) (Math.random() * (Main.WINDOW_WIDTH - ImageManager.MOB_ENEMY_IMAGE.getWidth())),
                (int) (ImageManager.MOB_ENEMY_IMAGE.getHeight()),
                4,
                0,
                hp, power);
    }
}
